package com.lanyuan.a.bean;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.fasterxml.jackson.annotation.JsonFormat;

@Entity
@Table(name="ly_order")
public class Order {
	private int id;
	private String isbuy;
	private int userId;
	private int w_f_id;
	private int f_id;
	private String f_name;
	private int num;
	private double price;
	private Date ordertime;
	@Id
	@GenericGenerator(name = "generator", strategy = "native")
	@GeneratedValue(generator = "generator")
	@Column(name = "id", length = 20)
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	@Column(name = "isbuy", length = 20)
	public String getIsbuy() {
		return isbuy;
	}
	public void setIsbuy(String isbuy) {
		this.isbuy = isbuy;
	}
	@Column(name = "user_id", length = 20)
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
	@Column(name = "f_id", length = 20)
	public int getF_id() {
		return f_id;
	}
	public void setF_id(int f_id) {
		this.f_id = f_id;
	}
	@Column(name = "f_name", length = 20)
	public String getF_name() {
		return f_name;
	}
	public void setF_name(String f_name) {
		this.f_name = f_name;
	}
	@Column(name = "num", length = 20)
	public int getNum() {
		return num;
	}
	public void setNum(int num) {
		this.num = num;
	}
	@Column(name = "price", length = 20)
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	@Column(name = "ordertime", length = 20)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getOrdertime() {
		return ordertime;
	}
	public void setOrdertime(Date ordertime) {
		this.ordertime = ordertime;
	}
	@Override
	public String toString() {
		return "Order [id=" + id + ", isbuy=" + isbuy + ", userId=" + userId
				+ ", f_id=" + f_id + ", f_name=" + f_name + ", num=" + num
				+ ", price=" + price + ", ordertime=" + ordertime + "]";
	}
	@Column(name = "w_f_id", length = 20)
	public int getW_f_id() {
		return w_f_id;
	}
	public void setW_f_id(int w_f_id) {
		this.w_f_id = w_f_id;
	}
	
}
